home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / rexmooslib.lha / MOOS / ARexx / dos / AddBuffers next >
Text File  |  1997-01-20  |  428b  |  25 lines

  1. /*
  2.  * 'dos/AddBuffers'()
  3.  *
  4.  * $(C): (1997, Rocco Coluccelli, Bologna)
  5.  * $VER: dos/AddBuffers 1.00 (17.Jan.1997)
  6.  */
  7.  
  8. SIGNAL ON error
  9. CALL CLOSE(STDOUT)
  10.  
  11. tmp = "T:add_buff." || PRAGMA('id')
  12. num = 0
  13.  
  14. ADDRESS COMMAND 'AddBuffers >'tmp '"'STRIP(ARG(1))'"' ARG(2)
  15. IF OPEN('log',tmp,'R') THEN DO
  16.     log = READCH('log',1024)
  17.     num = WORD(log,WORDS(log) - 1)
  18.     CALL CLOSE('log')
  19. END
  20.  
  21.  
  22. error:
  23.     ADDRESS COMMAND 'Delete >NIL:' tmp
  24.     EXIT num
  25.